package com.zcoco.distributed.common.integration.rocketmq;

import org.springframework.context.annotation.Configuration;

/**
 * @description:
 * @author: zhengkk@pingpongx.com
 * @create: 2019-12-06 20:57
 **/
@Configuration
public class RocketMQConfig {

  /*  @Bean
    public ProducerBean producerBean() {
        ProducerBean producerBean = new ProducerBean();
        Properties properties = new Properties();
        properties.setProperty("AccessKey", "");
        properties.setProperty("SecretKey", "");
        producerBean.setProperties(properties);
        return producerBean;
    }
    //https://help.aliyun.com/document_detail/29553.html?spm=a2c4g.11186623.6.571.39db162bEMgSsT
    @Bean
    public ConsumerBean consumerBean(MessageListener messageListener) {
        ConsumerBean consumerBean = new ConsumerBean();
        Properties properties = new Properties();
        properties.setProperty("GROUP_ID", "");
        properties.setProperty("AccessKey", "");
        properties.setProperty("SecretKey", "");
        consumerBean.setProperties(properties);
        Map<Subscription, MessageListener> maps = new HashMap<>();
        maps.put(new Subscription(), messageListener);
        consumerBean.setSubscriptionTable(maps);
        return consumerBean;
    }
*/

}
